home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 34
/
034.d81
/
inter melody
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
80 lines
5 poke53280,11:poke53281,.
10 if(peek(679)<>206)thenload"inter melody.ml1",8,1
15 if(peek(36818)<>120)thenload"inter melody.ml2",8,1
16 gosub9000:clr:goto110
20 poke198,.
23 geta$:ifa$=""then23
25 return
110 poke55,208:poke56,143:clr
120 dimnt$(12),fr(12):s=54272:base=36864:t=1:forl=stos+24:pokel,0:next
125 print"[147] [158][201]nter [205]elody"
126 print"[129] by"
127 print" [200][197][206][210][201][203] [205][193][210][203][193][210][201][193][206]"
128 print"[154] [208]ress [209] [154]to [209]uit."
130 print"[158][197]nter two voice numbers. [1-3]":print"->[153] [157][157][157][157][157]";
132 gosub20:if(a$<"1")or(a$>"3")and(a$<>"q")and(a$<>"[209]")then132
133 ifa$="q"ora$="[209]"thengosub50000:goto130
134 a=val(a$):printa$" ->[153]";
135 gosub20:ifa$="q"ora$="[209]"thengosub50000:goto130
136 if(a$<"1")or(a$>"3")or(val(a$)=a)then135
138 b=val(a$):printa$
139 a=(a-1)*7:b=(b-1)*7
140 ad(1)=0:sr(1)=240:ad(2)=9:sr(2)=0:ph(1)=0:pl(1)=0:ph(2)=0:pl(2)=0
150 wa=16:wb=32:tempo=15:rem waveform (16,32,64,128) & beat (60th of sec)
167 print"[147] [208]rocessing [206]otes"
170 fori=1to12:readnt$(i),fr(i):next
180 c=0:oc=4:rem start at 4th octave
190 readc$:ifc$="end"then310
200 ifc$="res"thenhf%=0:lf%=0:goto280
210 ifc$="+"thenoc=oc+1:goto190
220 ifc$="-"thenoc=oc-1:goto190
230 ifval(c$)>0then290
240 fori=1to12
250 ifc$=nt$(i)thenf=fr(i):i=12
260 next:f=f/(2^(7-oc))
270 hf%=f/256:lf%=f-256*hf%
280 pokebase+c,hf%:c=c+1:pokebase+c,lf%:c=c+1:print"-";:goto190
290 fori=1toval(c$)-1
300 pokebase+c,hf%:c=c+1:pokebase+c,lf%:c=c+1:print"-";:next:goto190
310 h(t)=c:t=t+1:pokebase+c,255:print
320 if(base+c)>=(base+2048)thenprint"error:[146] out of memory":end
330 ift=2thenbase=base+2048:goto180
340 ifh(1)<>h(2)thenprint"error:[146] number of notes do not match":end
350 poke704,a:poke709,b:poke762,tempo
360 poke692,a+4:poke753,a+4:poke688,wa:poke749,wa+1:rem set waveform a
370 poke695,b+4:poke756,b+4:poke690,wb:poke751,wb+1:rem set waveform b
380 pokes+a+5,ad(1):pokes+a+6,sr(1):pokes+b+5,ad(2):pokes+b+6,sr(2)
390 pokes+a+2,pl(1):pokes+a+3,ph(1):pokes+b+2,pl(2):pokes+b+3,ph(2)
400 print"[147][197]nter: [158]sys36818 to turn music"
410 print"on and off.":end
500 end
1005 data c,34334,c#,36376, d,38539
1010 data d#,40830, e,43258, f,45830
1020 data f#,48556,g,51443,g#,54502
1030 data a,57743,a#,61176, b,64814
2000 rem put notes here for voice 1
2010 data a,b,c,d,e,f,g,f,e,d,c,b,a
4999 data end
5000 rem put notes here for voice 2
5010 data g,f,e,d,c,b,a,b,c,d,e,f,g
7999 data end
9000 print"[147][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
9010 fora=1to23:print"[221]"spc(38)"[221]";:next
9020 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][157][148][192]"
9030 print"[159] [204][207][193][196][211][212][193][210] [208]resents:"
9040 print"[158] [201]nter [205]elody"
9050 print" by [200]enrik [205]arkarian"
9055 print" ([195])opyright 1987"
9060 print"[159] [208]ress [211][208][193][195][197] to continue.":poke198,.
9070 geta$:ifa$<>" "then9070
9080 return
40000 :
40001 :
50000 print:print"[154] [193]re you sure you want to quit? ([217][154]/[206][154])"
50010 gosub20:ifa$<>"y"anda$<>"n"anda$<>"[217]"anda$<>"[206]"then50010
50015 ifa$="[206]"thena$="n"
50020 ifa$="n"thenprint"[145] [145][145][145][145][145]":return
50030 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
50040 print"[147]";:ifer<>63thenend
50050 load"hello connect",8